#include "headfile.h"
#include "time.h"
/****************************************************************************************************************** 
 * @name: get_time()
 * @Author:   Maye
 * @Date: 2023/09/28
 * @brief: 用来算图像帧率
 * @param: get_time()无形参输入
 * @description: 
 * @return: SysTick->CNT / (SystemCoreClock/9000)帧数大小
 ******************************************************************************************************************/
void time_begin(){
    SysTick->CTLR = 0;
    SysTick->CNT = 0;
    SysTick->CTLR = 1;
}

void time_end(){
    SysTick->CTLR = 0;
}

int get_time(){
    return SysTick->CNT / (SystemCoreClock/9000);
}